/**
 * 
 */
package com.wolfware.athsweb.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author cstrzadala
 *
 */
public class Competition extends AbstractBaseDomain<Long> {

    /**
     * 
     */
    private static final long serialVersionUID = 4203896516923504371L;

    private String name;
    private Date date;
    private List<AbstractEvent> eventList = new ArrayList<AbstractEvent>();
    private List<AbstractCompetitionResult> competitionResultList = new ArrayList<AbstractCompetitionResult>();
    
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @param name the name to set
	 */
	public void setName(final String name) {
		this.name = name;
	}
	
	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}
	
	/**
	 * @param date the date to set
	 */
	public void setDate(final Date date) {
		this.date = date;
	}
	
	/**
	 * @return the numberOfEvents
	 */
	public Number getNumberOfEvents() {
		return eventList.size();
	}
	
	/**
	 * @return the eventList
	 */
	public List<AbstractEvent> getEventList() {
		return eventList;
	}
	
	/**
	 * @param eventList the eventList to set
	 */
	public void setEventList(final List<AbstractEvent> eventList) {
		this.eventList = eventList;
	}
	
	/**
	 * 
	 * @param event
	 */
	public void addEvent(final AbstractEvent event) {
		eventList.add(event);
	}
	
	/**
	 * 
	 * @param event
	 */
	public void removeEvent(final AbstractEvent event) {
		eventList.remove(event);
	}

	/**
	 * @return the competitionResultList
	 */
	public List<AbstractCompetitionResult> getCompetitionResultList() {
		return competitionResultList;
	}

	/**
	 * @param competitionResultList the competitionResultList to set
	 */
	public void setCompetitionResultList(final List<AbstractCompetitionResult> competitionResultList) {
		this.competitionResultList = competitionResultList;
	}
	
	/**
	 * 
	 * @param event
	 */
	public void addCompetitionResult(final AbstractCompetitionResult competitionResult) {
		competitionResultList.add(competitionResult);
	}
	
	/**
	 * 
	 * @param event
	 */
	public void removeCompetitionResult(final AbstractCompetitionResult competitionResult) {
		competitionResultList.remove(competitionResult);
	}
}